﻿
Partial Class Admin_ReleaseNotes
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        lblReleaseNotes.Text = ""
        Try
            Dim notes() As String = System.IO.File.ReadAllLines(Server.MapPath("~/ReleaseNotes.txt"))

            For Each note As String In notes
                note = note.Replace(vbTab, "")
                note = note.TrimStart(" ")

                If note.StartsWith("+") OrElse note.StartsWith("-") Then
                    lblReleaseNotes.Text += "<li style=""margin-left:20px;"">" & note.Replace("+", "(added)").Replace("-", "(removed)") & "</li>"
                Else
                    lblReleaseNotes.Text += "<b>" & note & "</b><br />"
                End If

            Next
        Catch ex As Exception
            lblReleaseNotes.Text = "Unable to read release notes"
        End Try
    End Sub
End Class
